package com.stx.day1011;

import java.io.FileInputStream;
import java.io.ObjectInputStream;

public class DeserializeDemo {
    public static void main(String[] args) {
//        反序列化-User
        try{
            FileInputStream fis = new FileInputStream("E:\\IDEA\\stx_chenyi\\src\\com\\stx\\day1011\\user.txt");
            ObjectInputStream ois = new ObjectInputStream(fis);
            User user = (User) ois.readObject();
            System.out.println(user);
        }catch (Exception e){
            e.printStackTrace();
        }
    }
}
